<template>
  <div class="container-max">
    <div class="first-box">
      <div class="first-box-nav">
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
        <div class="first-box-nav-item">
          <span class="iconfont icon-fenxiang"></span>
          <span>有声小说</span>
        </div>
      </div>
      <div class="first-box-content">
        <div class="move-img">
          <div
            class="swiper-container"
            ref="swiper"
            @mouseenter="mySwiper.autoplay.stop()"
            @mouseleave="mySwiper.autoplay.start()"
            
          >
            <div class="swiper-wrapper">
              <div class="swiper-slide">
                <img src="./imgs/5144e8aed6ae119c465897ed263ceb60.jpg" />
              </div>
              <div class="swiper-slide">
                <img src="./imgs/a2628668d1f4d0021afbf4ae15ccb924.jpg" />
              </div>
              <div class="swiper-slide">
                <img src="./imgs/banner_zt0002.jpg" />
              </div>
              <div class="swiper-slide">
                <img src="./imgs/banner_zt0004.jpg" />
              </div>
              <div class="swiper-slide">
                <img src="./imgs/banner_zt0006.png" />
              </div>
            </div>
            <!-- Add Arrows -->
            <div class="swiper-button-next"></div>
            <div class="swiper-button-prev"></div>
            <!-- Add Pagination -->
            <div class="swiper-pagination"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Swiper from 'swiper';
import 'swiper/css/swiper.min.css';

export default {
  name: 'ListenBook',
  mounted() {
    this.mySwiper = new Swiper(this.$refs.swiper, {
      navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
      },
      pagination: {
        el: '.swiper-pagination',
      },

      autoplay: true,
      loop: true,
    });
  },
};
</script>

<style  scoped>
.swiper-container{
  width: 100%;
  height: 100%;
}
.swiper-container img{
  width: 100%;
}
.swiper-button-next , .swiper-button-prev{
  color: #fff;
}
.container-max {
  width: 1000px;
  min-width: 1000xp;
  height: 100%;
  margin: 0 auto;
}
.first-box {
  width: 100%;
  height: 450px;
  margin: 24px 0 20px 0;

  display: flex;
}
.first-box-nav {
  width: 240px;
  height: 450px;

  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}
.first-box-content {
  width: 750px;
  height: 450px;
  background-color: green;
  margin-left: 10px;
}
.first-box-nav-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
.icon-fenxiang {
  font-size: 25px;
  color: #999999;
}
.first-box-nav-item span:nth-child(2) {
  color: #b3b3b3;
}
.move-img {
  width: 750px;
  height: 272px;
  background: red;
}
</style>
